insheet using Peacetrt.csv
gen policytotal = policy + regime
gen percentpolicy = policytotal/(policytotal + private)

* The next line produces the left column of Table 9.3

regress percentpolicy year
predict resids, residuals
list treaty year resids

* The next set of lines produce the right column of Table 9.3

gen total = policytotal + private
regress percentpolicy year [aweight = total]
predict weightedresids, residuals
list treaty year weightedresids

clear
exit
